const express = require("express");
const app = express();

const km = (req, res, next) => {
  console.log("定义了局部生效的中间件");
  next();
};

app.get("/", km, (req, res) => {
  res.send("Hello world");
});

app.get("/index", (req, res) => {
  res.send("Hello TNTo");
});

app.listen(80, () => {
  console.log("启动");
});
